package com.cineplanet.dew.modelo;

import java.io.Serializable;
import javax.persistence.*;

/**
 * The primary key class for the peliculas_por_cine database table.
 * 
 */
@Embeddable
public class PeliculasPorCinePK implements Serializable {
	//default serial version id, required for serializable classes.
	private static final long serialVersionUID = 1L;

	@Column(name="id_cine")
	private int idCine;

	@Column(name="id_pelicula")
	private int idPelicula;

    public PeliculasPorCinePK() {
    }
	public int getIdCine() {
		return this.idCine;
	}
	public void setIdCine(int idCine) {
		this.idCine = idCine;
	}
	public int getIdPelicula() {
		return this.idPelicula;
	}
	public void setIdPelicula(int idPelicula) {
		this.idPelicula = idPelicula;
	}

	public boolean equals(Object other) {
		if (this == other) {
			return true;
		}
		if (!(other instanceof PeliculasPorCinePK)) {
			return false;
		}
		PeliculasPorCinePK castOther = (PeliculasPorCinePK)other;
		return 
			(this.idCine == castOther.idCine)
			&& (this.idPelicula == castOther.idPelicula);

    }
    
	public int hashCode() {
		final int prime = 31;
		int hash = 17;
		hash = hash * prime + this.idCine;
		hash = hash * prime + this.idPelicula;
		
		return hash;
    }
}